package de.graffiti.paint;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;

import org.apache.batik.svggen.SVGGraphics2D;

public class ExportToFile implements Output
{

	public String export(SVGGraphics2D svgGenerator) throws IOException
	{

		// Finally, stream out SVG to the standard output using
		// UTF-8 encoding.
		boolean useCSS = true; // we want to use CSS style attributes

		Writer out;
		File file = new File("grafik.svg");
		OutputStream outputStream = new FileOutputStream(file);
		out = new OutputStreamWriter(outputStream, "UTF-8");
		svgGenerator.stream(out, useCSS);

		return "worked";

	}
}
